// [[ OnflowGenerator File UUID: c462739f1bd44088b774c7914c2d14a2  ]]
package com.itdct.onflow.system.log.controller

import com.itdct.onflow.core.type.Delete
import com.itdct.onflow.core.type.Detail
import com.itdct.onflow.core.type.Page
import com.itdct.onflow.core.vo.RespPageVo
import com.itdct.onflow.core.vo.RespVo
import com.itdct.onflow.system.common.base.BaseSysController
import com.itdct.onflow.system.log.qo.SysLoginLogEditQo
import com.itdct.onflow.system.log.qo.SysLoginLogSearchQo
import com.itdct.onflow.system.log.service.SysLoginLogService
import com.itdct.onflow.system.log.vo.SysLoginLogDetailVo
import com.itdct.onflow.system.log.vo.SysLoginLogListVo
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
import org.springframework.http.MediaType
import org.springframework.validation.annotation.Validated
import org.springframework.web.bind.annotation.*

/**
 * @author DCTANT
 * @date 2025-09-22 16:17:05
 * @version 1.0
 * @description 系统登录日志接口控制
 */
@Tag(name = SysLoginLogController.moduleName)
@RestController
@RequestMapping(value = ["/sysLoginLog"], produces = [MediaType.APPLICATION_JSON_VALUE], method = [RequestMethod.POST])
class SysLoginLogController(
    val sysLoginLogService: SysLoginLogService
) : BaseSysController() {
    companion object {
        const val moduleName = "系统登录日志"
    }

//    @Operation(summary = moduleName + "添加")
//    @PostMapping("/add.adw")
//    fun add(@RequestBody @Validated(Add::class) qo: SysLoginLogEditQo): RespVo<Long> {
//        return sysLoginLogService.add(qo, getContext())
//    }
//
//    @Operation(summary = moduleName + "更新")
//    @PostMapping("/update.adw")
//    fun update(@RequestBody @Validated(Update::class) qo: SysLoginLogEditQo): RespVo<Unit> {
//        return sysLoginLogService.update(qo, getContext())
//    }

    @Operation(summary = moduleName + "删除")
    @PostMapping("/delete.adw")
    fun delete(@RequestBody @Validated(Delete::class) qo: SysLoginLogEditQo): RespVo<Unit> {
        return sysLoginLogService.delete(qo, getContext())
    }

    @Operation(summary = moduleName + "详情")
    @PostMapping("/detail.adw")
    fun detail(@RequestBody @Validated(Detail::class) qo: SysLoginLogSearchQo): RespVo<SysLoginLogDetailVo> {
        return sysLoginLogService.detail(qo, getContext())
    }

    @Operation(summary = moduleName + "列表")
    @PostMapping("/page.adw")
    fun page(@RequestBody @Validated(Page::class) qo: SysLoginLogSearchQo): RespPageVo<SysLoginLogListVo> {
        return sysLoginLogService.page(qo, getContext())
    }

// [[ OnflowGenerator Range (- selectFunctions -) Start ]]

// [[ OnflowGenerator Range (- selectFunctions -) End ]]
}